From: Lukáš Tyrychtr Date: Mon, 8 Jun 2026 13:50:36 +0000 (+0200) Subject: search: Announce search result description to screen readers X-Git-Tag: archive/raspbian/50.5-1+rpi1^2~14^2^2~9 X-Git-Url: https://dgit.raspbian.org/%22http://www.example.com/cgi/%22/%22http:/www.example.com/cgi/%22?a=commitdiff_plain;h=50d88d937278573c3c0931eea21884e211c87106;p=gnome-shell.git search: Announce search result description to screen readers Add a described by relation to the search button so the description is read when the button gets focus. Part-of: (cherry picked from commit a6bb705d7abb1e867b117e66a03dba6c8ba8cb45) --- diff --git a/js/ui/search.js b/js/ui/search.js index 334f1243a..9ded14184 100644 --- a/js/ui/search.js +++ b/js/ui/search.js @@ -1,3 +1,4 @@ +import Atk from 'gi://Atk'; import Clutter from 'gi://Clutter'; import Gio from 'gi://Gio'; import GLib from 'gi://GLib'; @@ -112,6 +113,10 @@ class ListSearchResult extends SearchResult { }); content.add_child(this._descriptionLabel); + this.get_accessible().add_relationship( + Atk.RelationType.DESCRIBED_BY, + this._descriptionLabel.get_accessible()); + this._resultsView.connectObject( 'terms-changed', this._highlightTerms.bind(this), this);